function(doc){
	if(doc.doctype == 'product'){		
		if(doc.properties){
			doc.properties.forEach(function(prop) {
     			 emit([doc.topcategorycode, doc.leafcategorycode, prop['propertycode'], prop['propertyvaluecode']], null);
    		});
		}
	}
}